package com.hoshiicloud.goods.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.goods.feign.hystrix.HystrixIdGeneratorFeignFallback;
import com.hoshiicloud.user.entity.store.PlatStore;
import com.hoshiicloud.user.param.PlatStoreQueryParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author linjx on 2019/8/13
 */
@FeignClient(name = "hoshiicloud-user", fallback = HystrixIdGeneratorFeignFallback.class)
@Repository
public interface StoreFeignService {

    /**
     * @Author qry
     * @Date 17:37 2019/8/12
     * 获取总店下的分店列表
     **/
    @PostMapping("/store/plat-store/getPage")
    Response<Page<PlatStore>> getPlatStorePage(@RequestBody PlatStoreQueryParam param);

    /**
     * 获取店铺详情
     * @param id 店铺ID
     * @return Response<PlatStoreDTO>
     */
    @GetMapping(value = "/store/plat-store/{id}")
    Response<PlatStore> queryById(@PathVariable("id") Long id);
}
